home *** CD-ROM | disk | FTP | other *** search
- # Copyright (C) 1991, Commodore Business Machines, Inc.
- #
- # Execute a short assembly language function in the supervisor mode of
- # the processor. Supervisor() does not modify or save registers; the
- # user function has full access to the register set. The user function
- # must end with an RTE instruction.
- #
- # A pointer to the code to execute is passed in a5.
- # An additional parameter can be passed in a2.
- #
-
- .set ABSEXECBASE,4
- .set _LVOSupervisor,-0x1e
-
- .text
- .globl _supervisor
-
- _supervisor:
- movl a5,sp@-
- movl a2,sp@-
- movl a6,sp@-
- movl sp@(16),a5
- movl sp@(20),a2
- movl ABSEXECBASE,a6
- jbsr a6@(_LVOSupervisor)
- movl sp@+,a6
- movl sp@+,a2
- movl sp@+,a5
- rts
-